update r_workflow_model
set r_wkf_mdl_rules=
'<?xml version="1.0"?>
<Rules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" UseGlobalActionOnly="false">
  <WkfStates>
    <WkfState Value="Started">
      <Actions>
        <Action Identifier="1100" UiTypeAction="Validate" ValidatingMode="One" ValidatingState="Validated">
          <Conditions>
            <Condition Target="Document" IsFinalState="false" StateMode="One" NewState="Validated" />
            <Condition Target="Workflow" IsFinalState="true" NewState="Validated">
              <If>
                <States>
                  <State Target="Document" StateMode="All" Value="Validated" />
                </States>
              </If>
            </Condition>
          </Conditions>
        </Action>
        <Action Identifier="1101" UiTypeAction="Refuse" >
          <Conditions>
            <Condition Target="Document" IsFinalState="true" StateMode="One" NewState="Rejected" />
            <Condition Target="Workflow" IsFinalState="true" NewState="Rejected" />
          </Conditions>
        </Action>
        <Action Identifier="0" UiTypeAction="Revive" IsOption="true" IsSenderOnly="true"/>
      </Actions>
    </WkfState>
    <WkfState Value="Validated">
      <Actions>
        <Action Identifier="0" UiTypeAction="Index" IsOption="true" />
      </Actions>
    </WkfState>
    <WkfState Value="Rejected">
      <Actions>
        <Action Identifier="1000" UiTypeAction="Ventilate" IsSenderOnly="true"/>
        <Action Identifier="0" UiTypeAction="Index" IsOption="true" />
      </Actions>
    </WkfState>
  </WkfStates>
</Rules>'
where r_wkf_mdl_id = 1